home *** CD-ROM | disk | FTP | other *** search
- package koala.dynamicjava.tree;
-
- import java.util.List;
- import koala.dynamicjava.tree.visitor.Visitor;
-
- public class ArrayInitializer extends Expression {
- public static final String CELLS = "cells";
- public static final String ELEMENT_TYPE = "elementType";
- private List cells;
- private Type elementType;
-
- public List getCells() {
- return this.cells;
- }
-
- public void setCells(List var1) {
- if (var1 == null) {
- throw new IllegalArgumentException("l == null");
- } else {
- ((Node)this).firePropertyChange("cells", this.cells, this.cells = var1);
- }
- }
-
- public Type getElementType() {
- if (this.elementType == null) {
- throw new IllegalStateException("elementType == null");
- } else {
- return this.elementType;
- }
- }
-
- public void setElementType(Type var1) {
- if (var1 == null) {
- throw new IllegalArgumentException("t == null");
- } else {
- ((Node)this).firePropertyChange("elementType", this.elementType, this.elementType = var1);
- if (var1 instanceof ArrayType) {
- ArrayType var2 = (ArrayType)var1;
-
- for(Object var4 : this.cells) {
- if (var4 instanceof ArrayInitializer) {
- ((ArrayInitializer)var4).setElementType(var2.getElementType());
- }
- }
- }
-
- }
- }
-
- public Object acceptVisitor(Visitor var1) {
- return var1.visit(this);
- }
-
- public ArrayInitializer(List var1) {
- this(var1, (String)null, 0, 0, 0, 0);
- }
-
- public ArrayInitializer(List var1, String var2, int var3, int var4, int var5, int var6) {
- super(var2, var3, var4, var5, var6);
- if (var1 == null) {
- throw new IllegalArgumentException("cells == null");
- } else {
- this.cells = var1;
- }
- }
- }
-